TIDY

Section: Maintenance Commands (8)
Index Return to Main Contents

BSD mandoc
Linux  

NAME

tidy - tidy up log files created by syslogd and make statistics  

SYNOPSIS

tidy [-B db_file ] [-C config_file ] [-L log_file ] [-o output_file ] [-p pager_lines ] [-s sortkey ] [-abcDdHOqrtT ] [
+bcdOprt ]


tidy -h | -v  

DESCRIPTION

tidy cleans up the file(s) created by syslogd These files contain lots of messages from various system programs, e.g. in.telnetd and in.talkd For a system administrator it is a bothersome job to sort out the interesting (sometimes alarming) entries from a pile of standard entries. tidy performs statistics on these regular entries (number of contacts, time and/or date of last contact) that can be printed in ASCII or HTML format. The rest remains in the log file. The default configuration is read from tidy.conf , which can be modified by command line options (see below).  

REQUIREMENTS

Prior to executing tidy you have to make sure that syslogd is set up correctly. Check whether all messages from the mail facility are logged to a file (this file is called the `log file' in this manual). Refer to syslogd(8) and to syslog.conf5 for details. Note that for setting up syslogd you must be the super-user. However, you may still run tidy to make statistics if you have access to the log file.  

FEATURES

tidy goes through the log file line by line and eliminates the specified entries that are `unsuspicious'. If a message contains a remote host then it is added to the statistics, i.e. the count is incremented and the time/date stamp of the message is saved. A typical entry is for example:
Oct 25 13:41:54 myhost in.telnetd[342]: connect from foo.bar.dom

Tidy will remove this line from the log file, increment the number of telnet connections from foo.bar.dom and save it together with the time/date stamp of the last contact in the statistics database. Tidy distinguishes different services and is also able to discard entries that do not contain a remote host if some search string is matched. All other entries remain in the log file. The action of tidy is controlled by the configuration file tidy.conf  

OPTIONS

All options are defaulted in tidy.conf

-a
Force ASCII statistics output.
-B db_file
Specify an alternate filename for the database where the statistical data are kept.
-b
Force output of time/date below the number of contacts.
+b
Force output of time/date besides the number of contacts.
-C config_file
Force reading of an alternate config_file This is particularly useful when you want to tidy the log file completely but only statistics output of a few services.
-c
Turn on case sensitivity when sorting alphanumerically.
+c
Turn off case sensitivity.
+d
Force no date output.
-d
Force short date output format (e.g. '03/24') of last contact.
-D
Force long date output format (e.g. 'Mar 24') of last contact.
-H
Force HTML statistics output. Note that tidy produces tables. They look very neat when viewed with netscape , but other browsers (e.g. mosaic ) - especially older ones - won't display them. Pity. Use -a
-h
Show short help on usage and exit.
-L log_file
Specify an alternate log_file.
-O
Do not tidy the log file, only read the database and produce statistics output.
+O
Only tidy the log file and update the database, do not produce statistics output.
-o output_file
Specify the output filename for the statistics.
-p pager_lines
Specify the number of lines after that a new header is printed to the statistics output in order not to confuse the columns.
+p
Force output of header only on top of the table.
-q
Run in quiet mode, i.e. no output to STDOUT This is useful when tidy is run by cron
-r
Force output of a ruler line after each line of statistics output. This option has different meanings in the context of ASCII or HTML output. See tidy.conf5 for details.
+r
Suppress output of rulers. See above.
-s sortkey
Specify an alternate sortkey by which the statistics output is sorted. Valid settings are `none', `host' (sort by host name), `domain' (sort by host domains, i.e. foo.com comes before bar.edu before aaa.org) and the service names (sort by number of contacts). See tidy.conf5Ns.
+t
Force no time output.
-t
Force short time output format (e.g. '18:52') of last contact.
-T
Force long time output format (e.g. '18:52:01')
-v
Show version information and exit.

 

FILES

tidy.conf
The configuration file, if no other is specified by the -C Option.
tidy.db
The default database file, where the statistics data are stored, if no other is specified by the -B Option.
tidy.txt
The default ASCII output filename and
tidy.html
The default HTML output filename; other names may be specified by the -o Option.

 

SEE ALSO

tidy.conf5, syslogd(8), syslog.conf5  

VERSION

This is the 1.0 release of tidy. Bug reports and suggestions are welcome!  

BUGS

tidy is not 100% correct in handling the log file, i.e. when syslogd adds a message to the log file while tidy is processing it, the message will be overwritten.  

AUTHOR

Marek Rouchal, University of Bayreuth, Germany
(marek@saftsack.fs.uni-bayreuth.de)


 

Index

NAME
SYNOPSIS
DESCRIPTION
REQUIREMENTS
FEATURES
OPTIONS
FILES
SEE ALSO
VERSION
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 15:39:52 GMT, November 05, 2024